package com.lyl.controller;

import com.lyl.pojo.Doctor;
import com.lyl.service.DoctorService;
import com.ruoyi.common.core.domain.AjaxResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/doctor")
public class DoctorController {
    @Autowired
    private DoctorService doctorService;

    @GetMapping("/list")
    public AjaxResult getDoctorList(){
        List<Doctor> list = doctorService.list();
        return AjaxResult.success(list);
    }
}
